/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Relatorios;

import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 *
 * @author wandeyr
 */
@Entity
@Table(name = "dados", catalog = "siscodiwa", schema = "")
@NamedQueries({
    @NamedQuery(name = "Dados.findAll", query = "SELECT d FROM Dados d"),
    @NamedQuery(name = "Dados.findById", query = "SELECT d FROM Dados d WHERE d.id = :id"),
    @NamedQuery(name = "Dados.findByLogin", query = "SELECT d FROM Dados d WHERE d.login = :login"),
    @NamedQuery(name = "Dados.findByDataIncidente", query = "SELECT d FROM Dados d WHERE d.dataIncidente = :dataIncidente"),
    @NamedQuery(name = "Dados.findByTelefone", query = "SELECT d FROM Dados d WHERE d.telefone = :telefone"),
    @NamedQuery(name = "Dados.findByTarefa", query = "SELECT d FROM Dados d WHERE d.tarefa = :tarefa"),
    @NamedQuery(name = "Dados.findByTipo", query = "SELECT d FROM Dados d WHERE d.tipo = :tipo"),
    @NamedQuery(name = "Dados.findByDataFim", query = "SELECT d FROM Dados d WHERE d.dataFim = :dataFim"),
    @NamedQuery(name = "Dados.findByNotas", query = "SELECT d FROM Dados d WHERE d.notas = :notas")})
public class Dados implements Serializable {
    @Transient
    private PropertyChangeSupport changeSupport = new PropertyChangeSupport(this);
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Column(name = "login")
    private String login;
    @Column(name = "dataIncidente")
    private String dataIncidente;
    @Column(name = "telefone")
    private String telefone;
    @Column(name = "tarefa")
    private String tarefa;
    @Column(name = "tipo")
    private String tipo;
    @Column(name = "dataFim")
    private String dataFim;
    @Column(name = "notas")
    private String notas;

    public Dados() {
    }

    public Dados(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        Integer oldId = this.id;
        this.id = id;
        changeSupport.firePropertyChange("id", oldId, id);
    }

    public String getLogin() {
        return login;
    }

    public void setLogin(String login) {
        String oldLogin = this.login;
        this.login = login;
        changeSupport.firePropertyChange("login", oldLogin, login);
    }

    public String getDataIncidente() {
        return dataIncidente;
    }

    public void setDataIncidente(String dataIncidente) {
        String oldDataIncidente = this.dataIncidente;
        this.dataIncidente = dataIncidente;
        changeSupport.firePropertyChange("dataIncidente", oldDataIncidente, dataIncidente);
    }

    public String getTelefone() {
        return telefone;
    }

    public void setTelefone(String telefone) {
        String oldTelefone = this.telefone;
        this.telefone = telefone;
        changeSupport.firePropertyChange("telefone", oldTelefone, telefone);
    }

    public String getTarefa() {
        return tarefa;
    }

    public void setTarefa(String tarefa) {
        String oldTarefa = this.tarefa;
        this.tarefa = tarefa;
        changeSupport.firePropertyChange("tarefa", oldTarefa, tarefa);
    }

    public String getTipo() {
        return tipo;
    }

    public void setTipo(String tipo) {
        String oldTipo = this.tipo;
        this.tipo = tipo;
        changeSupport.firePropertyChange("tipo", oldTipo, tipo);
    }

    public String getDataFim() {
        return dataFim;
    }

    public void setDataFim(String dataFim) {
        String oldDataFim = this.dataFim;
        this.dataFim = dataFim;
        changeSupport.firePropertyChange("dataFim", oldDataFim, dataFim);
    }

    public String getNotas() {
        return notas;
    }

    public void setNotas(String notas) {
        String oldNotas = this.notas;
        this.notas = notas;
        changeSupport.firePropertyChange("notas", oldNotas, notas);
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Dados)) {
            return false;
        }
        Dados other = (Dados) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Relatorios.Dados[ id=" + id + " ]";
    }

    public void addPropertyChangeListener(PropertyChangeListener listener) {
        changeSupport.addPropertyChangeListener(listener);
    }

    public void removePropertyChangeListener(PropertyChangeListener listener) {
        changeSupport.removePropertyChangeListener(listener);
    }
    
}
